import { axiosMock, delayFn } from '@/services/axiosMock'
import type * as T from '../interface'

axiosMock('default', mock => {
  // 获取地址信息
  mock.onPost(`/tmsapi/waybill_record/getAddressInfo`).reply(
    delayFn<T.IAddress>(600, () => {
      return {
        success: true,
        data: {
          destinationAddress: '领赫东莞仓',
          destinationCode: 'A002',
          destinationContacts: '王先生',
          destinationCountry: '美国',
          destinationMail: '9723342@gmail.com',
          destinationPhone: '23336789',
          supplierAddress: 'MIT2',
          supplierContacts: 'jordan Garner',
          supplierCountry: '美国',
          supplierPhone: '071234666',
          supplierWarehouse: '领赫东莞仓2',
          waybillNo: 'LH0807AAAA',
        },
      }
    }),
  )
  // 获取地址信息
  mock.onPost(`/tmsapi/waybill_record/getOrderProductBoxInfo`).reply(
    delayFn<T.IOrderProductBoxInfo>(600, () => {
      return {
        success: true,
        data: {
          boxNum: 0,
          weight: '12',
          volume: '12',
        },
      }
    }),
  )
})
